Data forwarding performance of a forwarding device significantly affects a transmission speed of network data. After entering the forwarding device, the network data is processed step by step according to an instruction of a forwarding action in each look-up table in the forwarding device, until the data is output from the forwarding device after jumping through several look-up tables.
In a SDN (software-defined networking) network architecture, these look-up tables in the forwarding device are created according to an instruction delivered by a controller, so as to customize a forwarding action of a network on the forwarding device.
When the network data jumps through the look-up tables of the forwarding device and a series of actions are performed, mask matching needs to be performed between a keyword carried in the network data and a keyword of each entry in each look-up table, and only a forwarding action in an entry whose keyword matches the keyword carried in the network data is performed. However, because a TCAM (ternary content addressable memory) circuit needs to be used in mask matching, a large quantity of chip resources are consumed, causing a large quantity of gate circuits on a chip and huge power consumption of the chip.